Skip to main content

Message types

messageTypeDescription of message
ACCESS_TOKENAccess token for retrieval of final measurement results via HTTP endpoint
MEASUREMENT_MEAN_DATAMeasurement mean data for current session
MEASUREMENT_STATUSCurrent status of measurement engine
SENDING_RATE_WARNINGNotification about slowing of images sending from frontend
MEASUREMENT_PROGRESSCurrent progress of the measurement
MEASUREMENT_SIGNALPPG signal calculated by the measurement engine
MOVING_WARNINGNotification of user moving his head too much
BLOOD_PRESSUREBlood pressure values calculated for current session
UNSTABLE_CONDITIONS_WARNINGNotification of unstable conditions
INTERFERENCE_WARNINGNotification of interference which persists for long time
SIGNAL_QUALITYCurrent signal quality
HRV_METRICSCurrent values of HRV metrics

1. SENDING_RATE_WARNING.

This message contains current notification message about slowing of image sending either because of device fps leak or due to internet connection.

When frontend receives this message, they can notify through user interface about the problem with image sending slowing. As far as we handle such an event of slowing for each incoming image the frontend side can display wrapped notification for user for some fixed time (2-3 sec) and after this time passed the notification should fade away.

Example:

{
"messageType": "SENDING_RATE_WARNING",
"data": {
"delayValue": "250",
"notificationMessage":"The image sending rate doesn't correspond to provided frame rate.
Please check your device state or internet connection"
}
}
FieldTypeDescription
delayValuelongDelay between image sending that doesn't match to fps specified
notificationMessagestringDetailed notification message for frontend

2. MEASUREMENT_PROGRESS

This message contains current progress of the measurement. The progress here means amount of images supplied to the backend divided by minimum amount of images required by RPPG algorithm to start calculating BPM values. For example, if progress = 75%, it means that only 75% of required images were supplied, so RPPG algorithm can't start calculating values yet. If progress = 100%, it means that there were enough images supplied, so RPPG algorithm can already calculate the values. If progress > 100%, it means that RPPG algorithm is in the recalibrating process.

Backend sends this message not after each frame, but with some interval. This message is sent only if current tracker status in CALIBRATING or RECALIBRATING.

When frontend receives this message, it should notify the user about the current progress.

Example:

{
"messageType": "MEASUREMENT_PROGRESS",
"data": {
"progressPercent": 55,
}
}
FieldTypeDescription
progressPercentintegerCurrent progress (in percent)

3. MEASUREMENT_SIGNAL

This message contains recent PPG signal data calculated by the measurement engine. Data consists of last X values of PPG signal, where X <= 256. If amount of data values < 256, it means that all signal data is sent. If amount of data values = 256, it means that last 256 values of signal is sent.

The values of signal data are nonnegative integers within 0..127 interval (inclusive).

Backends sends this message to the frontend after receiving each image frame from the frontend.

When frontend receives this message, it should display this signal for the user (as a graph, for example).

Example:

{
"messageType": "MEASUREMENT_SIGNAL",
"data": {
"signal" : [
0,
34,
79,
127,
99
]
}
}
FieldTypeDescription
signalarray of integersLast signal values (each value is nonnegative integer within 0..127 interval (inclusive)

4. MOVING_WARNING

This message is sent from the backend to the frontend when RPPG library determines that the user moves his head too much. The message is sent after each received image frame until the user stops moving.

When frontend receives this message, it should display notification to the user that user should stop moving.

Example:

{
"messageType": "MOVING_WARNING",
"data": {
}
}

5. UNSTABLE_CONDITIONS_WARNING

This message is sent by the backend when measurement status is NOISE_DURING_EXECUTION for more than 5 seconds. Recommended behavior for the frontend is to show the warning message (like "Detecting unstable conditions, attempting to re-adjust") to the user.

Example:

{
"messageType": "UNSTABLE_CONDITIONS_WARNING",
"data": {
}
}

6. INTERFERENCE_WARNING

This message is sent by backend when measurement status is NOISE_DURING_EXECUTION for more than 15 seconds. Recommended behavior for the frontend is to stop the session.

Example:

{
"messageType": "INTERFERENCE_WARNING",
"data": {
}
}